<?
// lay duoi file trong trang admin_func.php
	function GetMedia1e($link)
	{
		$ret="";
		$ext=GetFileExtention($link);
		// echo $ext;
		switch ($ext)
		{
			case ".swf":
				$ret='<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj5" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="945" height="152"  >';
				$ret.='<param name="movie" value="../'.$link.'">';
				$ret.='<param name="quality" value="High">';
				$ret.='<param name="wmode" value="transparent"> ';
				$ret.='<embed src="../'.$link.'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj5" width="945" height="152"   wmode="transparent"  ></object>';
				break;
			case ".gif":
			case ".jpg":
			case ".jpeg":
			case ".bmp":
			case ".png":
				$ret='<img src="../'.$link.'"  border=0 width="945" height="152" />';
				break;		
			default:
				break; 
		}
		echo $ret; // xuat file ra man hinh/
		// return $ret;
	}

	function GetBannertop()
	{		
		$where="1=1 and link_websites_status=0 and link_websites_categoriesid=1 order by link_websites_dateadded DESC limit 0,1";					
		$result = getinfo("link_websites",$where);
		
		 while ($row=mysql_fetch_array($result)){ 
	
		 GetMedia1e($row['link_websites_img']);
		 
		  } 
		
		
	}?>
